<?php
class Site_balance_logAction extends CommonAction {
	
	function index(){
		$id = intval($this->_get('id'));
		$this->site_id = $id;
		$this->listmap = ' site_id = '.$id;
		$this->listorder="dateline desc";
        $this->_list();
		$this->display();
	}
	
	public function add(){
		$this->site_id = $this->_get('id');
		parent::add();
	}
	public function insert(){
		$ret = $this-> dao -> change($this -> _post('money'), $this-> _post('cursite_id'), $this-> _post('remark'));
		if($ret){
			$this->success('操作成功', U('index', array('id' => $this->_post('cursite_id'))));
		}else{ 
			$this->success('操作失败，请联系开发人员'.$this -> dao -> getError(), U('index', array('id' => $this->_post('cursite_id'))));
		}
	}
}